<h1 class="title">Create a new repository</h1>

<%= form_for @changeset, Routes.repo_path(@conn, :create), [as: :repo], fn f -> %>
  <div class="field">
    <%= label f, :name, class: "label" %>
    <div class="control">
      <%= text_input f, :name, class: "input" %>
    </div>
    <%= error_tag f, :name %>
  </div>

  <div class="field">
    <%= label f, :description, class: "label" %>
    <div class="control">
      <%= text_input f, :description, class: "input" %>
    </div>
    <%= error_tag f, :description %>
  </div>

  <div class="field">
    <div class="control">
      <label class="radio">
        <%= radio_button f, :public, true %>
        Public
      </label>
      <label class="radio">
        <%= radio_button f, :public, false %>
        Private
      </label>
    </div>
  </div>

  <hr />

  <div class="field">
    <%= submit "Create repository", class: "button is-success" %>
  </div>
<% end %>

